]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
st/label: Don't guard against NULL text
authorFlorian Müllner <fmuellner@gnome.org>
Fri, 2 Sep 2022 16:46:13 +0000 (18:46 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Fri, 2 Sep 2022 16:59:07 +0000 (18:59 +0200)
Commit 9168f6055e marked the parameter as nullable, which is in
conflict with the precondition check. But given that NULL is
valid for the underlying ClutterText (and GtkLabel accepts it
as well), there's no strong argument for disallowing NULL, so
remove the precondition check.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2465>

src/st/st-label.c

index e9893fe01e006f6a67c93ec17d87fa003c623953..fe77743c4438b804c0470b68020e10f2bc552075 100644 (file)
@@ -409,7 +409,6 @@ st_label_set_text (StLabel     *label,
   ClutterText *ctext;
 
   g_return_if_fail (ST_IS_LABEL (label));
-  g_return_if_fail (text != NULL);
 
   priv = label->priv;
   ctext = CLUTTER_TEXT (priv->label);